Skip to content

replace strncmp calls with static size, replace single char compare#81

Open
Jan200101 wants to merge 1 commit into13-CF:masterfrom
Jan200101:PR/strcmpr
Open

replace strncmp calls with static size, replace single char compare#81
Jan200101 wants to merge 1 commit into13-CF:masterfrom
Jan200101:PR/strcmpr

Conversation

@Jan200101
Copy link
Contributor

calls like strncmp(osname, "Alpine Linux", 12) end up being more work than they are worth and getting the length of the const string should be gathered at compile time.

instances of strncmp with a size of 1 were simple replace with a compare, if the logic around it ensures that the pointer will not be out of bounds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant